#if !defined( WEBBY_MODULES_HXX)
#define WEBBY_MODULES_HXX

#include <string>

#include <boost/shared_ptr.hpp>
#include <webby/config.hxx>

namespace webby
{

	class Module
	{
	public:
		virtual ~Module() {}
		unsigned int getAPIVersion() { return WEBBY_API_VERSION; }

		virtual std::string getModuleName() const = 0;

                // Called when server has started
                virtual void onStarted() {}

                // Called when the server is shutting down
                virtual void onShutdown() {}

                // Called periodically
                virtual void onHeartbeat() {}
	};

	typedef boost::shared_ptr< Module > ModulePtr;

}

#endif
